<template>
	<view class="community">
		<text class="message">社区管理员</text>

		<view class="admin" v-for="(item,index) in contactStaffList" :key='item.id' @click="goCommunity(item)">
			<view class="adminLt">
				<image :src="URL+item.photo" mode=""></image>
				<view class="adminFont">
					<text class="name">{{item.name}}</text>
					<text class="position">{{item.typename}}</text>
				</view>
			</view>
			<text class="iconfont icon-ziyuan"></text>
		</view>
	
		</view>
	</view>
</template>

<script>
	import {contactStaff} from '../../api/MyHouse.js'
	import {IMGBASEURLS} from '../../utils/config.js';
	export default{
		data(){
			return{
				URL:IMGBASEURLS,
				contactStaffList:[]
			}
		},
		onLoad() {
			this.getcontactStaff()
		},
		methods:{
			goCommunity(item){
				console.log(item)
				uni.navigateTo({
					url:'/pages/particulars/page?userid='+item.userid+'&photo='+item.photo
				})
			},
			
			async getcontactStaff(){
				let res = await contactStaff()
				if(res.errCode == '10000'){
					this.contactStaffList = res.data.list
				}
		}
		}
	}
</script>

<style lang="less">
	@import './../../static/style/community.less';
</style>
